function vans
clf

tmax=100;

% get(gcf)
set(gcf,'Position', [831 504 515 280]);

%  asy
y10=-1; y20=3; y30=0.01;
y0=[y10 y20 y30];
%[tt,yy] = ode45(@rhs2,[0 tmax],y0);  

%options = odeset('RelTol', 1e-12);
%[tt,yy] = ode113(@rhs,[0 tmax],y0,options);  

[tt,yy] = ode45(@rhs,[0 tmax],y0);

hold on
box on
grid on

%plot(yy(:,2),yy(:,1),'--','Linewidth',1)

%plot(tt,yy(:,1),'r','Linewidth',1)
plot(tt,yy(:,2),'b','Linewidth',1)
plot(tt,yy(:,3),'r','Linewidth',1)

%axis([0 tmax -0.601 0.6])
%loc='NorthWest';
loc='SouthEast';

xlabel('t-axis','FontSize',14,'FontWeight','bold')
ylabel('Solution','FontSize',14,'FontWeight','bold')

%set(gca,'xtick',[0 1 2]);
%set(gca,'ytick',[0 0.5]);
%set(gca,'XTickLabel',{'0';'t_M';'2t_M'})
%set(gca,'YTickLabel',{'0';'x_M'})

set(gca,'FontSize',14);
%legend(' Exact Solution',' y_0(t)+\epsilon y_1(t)','Location',loc);
set(findobj(gcf,'tag','legend'),'FontSize',14); 



%  define f(t,y)
function dy=rhs(t,y)
a=10;
dy=zeros(3,1);
dy(1) = 0.5*a*(y(3)/y(2) - y(2)/y(3))*cos(y(1));
dy(2) = 0.5*y(2)*(1-0.25*y(2)^2)+0.5*a*y(3)*sin(y(1));
dy(3) = 0.5*y(3)*(1-0.25*y(3)^2)-0.5*a*y(2)*sin(y(1));



